#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'

signed main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n; cin >> n;
    if (n == 1) {
        cout << 0 << endl; return 0;
    }
    int cnt = 0;
    while (n != 1) {
        if (n & 1) n = (3 * n + 1) / 2;
        else n /= 2;
        cnt++;
    }
    cout << cnt << endl;
    return 0;
}